package com.ruoyi.lxy.zust.service.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.ruoyi.lxy.zust.domain.TStaff;
import com.ruoyi.lxy.zust.mapper.DepartmentMapper;
import com.ruoyi.lxy.zust.service.IDepartmentService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

@DS("slave")
@RequiredArgsConstructor
@Service
public class TDepartmentServiceImpl implements IDepartmentService {
    final DepartmentMapper departmentMapper;
    final TStaffServiceImpl tStaffService;

    @Override
    public String getDepartment(String zgh) {
        TStaff tStaff= tStaffService.selectByZgh(zgh);
        return departmentMapper.getDepartment(tStaff.getDWDM());
    }

    public String getDWMC(String DWDM){
        return departmentMapper.getDepartment(DWDM);
    }



}
